<!doctype html>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <block name="title"><title>商铺服务项管理页面</title></block>
    <link rel="stylesheet" href="__PUBLIC__/bootstrap/dist/css/bootstrap.min.css"> <!--easyui_css文件-->
  <link href="__PUBLIC__/easyui/themes/default/easyui.css" rel="stylesheet" type="text/css" />
  <link href="__PUBLIC__/easyui/themes/icon.css" rel="stylesheet" type="text/css" /> 
  --js文件-->

  <script src="__PUBLIC__/bootstrap/js/jquery.min.js"></script>
  <script src="__PUBLIC__/bootstrap/js/bootstrap.min.js"></script>
  <script src="__PUBLIC__/bootstrap/js/holder.min.js"></script>
  <script src="__PUBLIC__/bootstrap/js/application.js"></script>
  <script type="text/javascript" src="__PUBLIC__/bootstrap/js/jquery.easyui.min.js"></script>



  <!--<script type="text/javascript" src="__PUBLIC__/easyui/jquery.min.js"></script>-->
  <script type="text/javascript" src="__PUBLIC__/easyui/jquery.easyui.min.js"></script>
  <script type="text/javascript" src="__PUBLIC__/easyui/locale/easyui-lang-zh_CN.js" ></script>


  <!--ueditor-->
    <script type="text/javascript" charset="utf-8" src="__PUBLIC__/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="__PUBLIC__/ueditor/ueditor.all.min.js"> </script>
    <!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
    <!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
    <script type="text/javascript" charset="utf-8" src="__PUBLIC__/ueditor/lang/zh-cn/zh-cn.js"></script>  


<script type="text/javascript">

$(function(){

      $('#dt').datetimebox({
        value: '3/4/2010 2:3',
        required: true,
        showSeconds: false
    });
    
// $('#shop_name').focus(function(){
//   $('.shop_name_mess').html("商铺名称不能为空");
// });
// $('#shop_address').focus(function(){
//   $('.shop_address_mess').html("商铺地址不能为空");
// });
// $('#shop_telphone').focus(function(){
//   $('.shop_telphone_mess').html("商铺电话不能为空");
// });
// $('#shop_open_time').focus(function(){
//   $('.shop_open_time_mess').html("营业时间不能为空");
// });

// $('#shop_add').click(function() { 
//       // body...console.log(data.time)
//       // alert(1);
        
//     var action=$('.shop_add_form').attr('action');
//     var parms=$('.shop_add_form').serialize();

//     $.post(action,parms,function(data){   
//      // alert(1); 
//       if(data['status']==1){
//         location.href=data['url']; 
//       }else{
//         // alert(2);
//         $('.shop_name_mess').html("");
//         $('.shop_address_mess').html("");
//         $('.shop_telphone_mess').html("");
//         $('.telephone_mess').html("");
//         $('.shop_open_time_mess').html("");
//         // alert(10);
//         if(data['shop_name']){
//           // alert(2);
//           $('.shop_name_mess').html(data['shop_name']);
//         }
//         if(data['shop_address']){
//           // alert(3);
//           $('.shop_address_mess').html(data['shop_address']);
//         }
//         if(data['shop_telphone']){
//           // alert(4);
//           $('.shop_telphone_mess').html(data['shop_telphone']);
//         }
//         if(data['shop_open_time']){
//           // alert(5);
//           $('.shop_open_time_mess').html(data['shop_open_time']);
//         }
//       }
//     },'json');
// });


//editor

var ue = UE.getEditor('container', {
    toolbars: [
        ['bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc']
    ],
    maximumWords :255, //允许的最大字符数
    autoHeightEnabled: true,
    autoFloatEnabled: true
});

var ue = UE.getEditor('container2', {
    toolbars: [
        ['bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc']
    ],
    maximumWords :255, //允许的最大字符数
    autoHeightEnabled: true,
    autoFloatEnabled: true
});



});





  </script>




</head>
<body>

<div class="container">
    <div class="panel panel-default">
      <div class="panel-heading">
        <h4>增加菜单</h4>
      </div>
      <div class="panel-body">
        <form action="{:U('addShopServiceItem',array('id'=>$id))}" enctype="multipart/form-data" method="post">
          <div class="form-group">
            <label for="service_item_name">菜名:</label>  
            <input type="text" name='service_item_name' class='form-control' placeholder='例如：红烧肉'>
          </div>

          <div class="form-group">
            <label for="class_id">选择所属分类</label>
                        <select name="class_id" class='form-control'>
                         <option selected="selected" value="0">根类</option>
                         <volist name="alist" id="vo">

                          <if condition="$vo.leafcategory eq 0">
                              <option disabled>                            
                              <?php 
                                for($i=0;$i<$vo['count'];$i++){
                                  echo '&nbsp&nbsp';  
                                }
                              ?>
                              {$vo['name']}
                              </option>
                          <else />
                               <option value="{$vo['id']}">                            
                                <?php 
                                  for($i=0;$i<$vo['count'];$i++){
                                    echo '&nbsp&nbsp';  
                                  }
                                ?>
                                {$vo['name']}
                              </option>
                          </if>
                         </volist>
                        </select>
          </div>
          <div class="form-group">
            <label for="service_item_price">价格:</label>  
            <input type="text" name='service_item_price' class='form-control' placeholder='例如：6.5'>
          </div>
          <div class="form-group">
            <label for="service_item_price">菜品图片:</label>  
             <input type='file' class="btn btn-default" name='photo'>
          </div>
           <div class="form-group">
            <label for="content">菜品简介:</label>  
             <script id="container" name="content" type="text/plain">
                          请在这里填写简介
                        </script> 
          </div>

          <div class="form-group">
            <label for="service_item_is_up">选择上下架状态:</label>  
            <label class="radio-inline">
              <input type="radio" checked="checked" name="service_item_is_up" id="inlineRadio1" value="1">立即上架
            </label>
            <label class="radio-inline">
              <input type="radio" name="service_item_is_up" id="inlineRadio2" value="0">暂时下架状态
            </label>
          </div>


      <!--     <div class="radio">
  <label>
    <input type="radio" name="optionsRadios" id="optionsRadios2" value="option2">
    Option two can be something else and selecting it will deselect option one
  </label>
</div> -->
          <div class="form-group">
            <label for="service_item_service_up_time">上架时间:</label>  
             <input id="dt" type="text" name="service_item_service_up_time">
          </div>

          <div class="form-group">
            <label for="service_item_in_out_or_all">选择提供方式:</label>  
            <label class="radio-inline">
              <input type="radio" checked="checked" name="service_item_in_out_or_all" id="inlineRadio1" value="0">堂食
            </label>
            <label class="radio-inline">
              <input type="radio" name="service_item_in_out_or_all" id="inlineRadio2" value="1">外卖
            </label>
            <label class="radio-inline">
              <input type="radio" name="service_item_in_out_or_all" id="inlineRadio2" value="2">堂食及外卖
            </label>
          </div>



           

          <div class="form-group">
            <input type="hidden" name="shopid" value="{$id}">
            <input class="btn btn-default" type="submit" value="添加菜单" />
            <input type="reset" value="重置" class="btn btn-default">
          </div>
        </form> 
      </div>
    </div>
  </div>



  

</body>
</html>